from sklearn.ensemble import RandomForestClassifier as RF
# 接收参数创建一个RandomForest分类器
def buildClassify(args):
    C = args.get('criterion', 'gini')
    # 树的最大深度
    D = args.get('max_depth', None)
    # 最少叶子数
    M = args.get('min_samples_leaf', 1)
    # 根据参数来创建分类器
    clf = RF(criterion="gini", max_depth=D, min_samples_leaf=M)
    print(clf)
    return clf
